﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<%= TempData["Message"]%>
    <div id="cactionbutton">
        <button type="button" id="btnRefesh" title="Làm mới" class="button refresh">Làm mới</button> 
        <button type="button" id="btnDelete" title="Xóa" class="button delete">Xóa</button>
        <button type="button" id="btnAddNew" title="Tạo mới" class="button addnew">Tạo mới</button> 
    </div>
   
    <div class="clist">
        <table id="list" class="scroll">
        </table>
        <div id="pager" class="scroll" style="text-align: center;">
        </div>
    </div>
   

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageTitle" runat="server">
Thông tin quảng cáo
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript">
    jQuery(document).ready(function () {
        //Add New
        $("#btnAddNew").click(function () {
            window.location = "/Administration/Advertising/Create";
        });
        // refresh button
        $("#btnRefesh").click(function () {
            window.location = "/Administration/Advertising";
        });

        // delete button           
        $("#btnDelete").click(function () {
            JS_LIB.deletes('#list', 'ID', '/Administration/Advertising/DeleteList');
        });
    });
    </script>
    <%  
        TSV.Library.Controls.GridViewControls grid = new TSV.Library.Controls.GridViewControls();
        grid.Width = 1200;
        grid.RowNum = 10;
        grid.RowList = "[10,20,30,40,50]";
        string[] colNames = { "Stt", "ID", "Hình ảnh","Tiêu đề", "Thứ tự","Vị trí","Liên kết","Bài riêng", "Chức năng" };
        string[] colModels = {  "{ name: 'No', index: 'No', align: 'center', width: 20}",
                                "{ name: 'ID', index: 'ID', align: 'center', width: 50,hidden: true}",
                                "{ name: 'Image', index: 'Image', align: 'center', width: 100, sortable: false }",
                                "{ name: 'Title', index: 'Title', align: 'center', width: 120, sortable: true }",
                                "{ name: 'AdOrder', index: 'AdOrder', align: 'center', width: 20, sortable: true }",
                                "{ name: 'Position', index: 'Position', align: 'center', width: 30, sortable: true }",
                                "{ name: 'ExternalLink', index: 'ExternalLink', align: 'center', width: 150, sortable: true }",
                                "{ name: 'IsIntenalLink', index: 'IsIntenalLink', align: 'center', width: 50, sortable: true }",
                                "{ name: 'Action', index: 'Action', editable: false, width: 42, align: 'center', sortable: false}"
                            };

        Response.Write(grid.ShowGrid("/Administration/Advertising/GetListJQGrid/", colNames, colModels));
    %>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="ModuleName" runat="server">
Thông tin quảng cáo
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="FunctionTitle" runat="server">
Thông tin quảng cáo
</asp:Content>

<asp:Content ID="Content6" ContentPlaceHolderID="LoginRoles" runat="server">
</asp:Content>
